#ifndef _ADC_DRIVER_H_
#define _ADC_DRIVER_H_
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "soc/soc_caps.h"
#include "esp_log.h"
#include "esp_adc/adc_oneshot.h"
#include "esp_adc/adc_cali.h"
#include "esp_adc/adc_cali_scheme.h"


#define NO_OF_SAMPLES           10 //采样次数 16次
#define EXAMPLE_ADC_ATTEN           ADC_ATTEN_DB_12
#define ADC_NUM ADC_UNIT_1
#define ADC_CHANNEL ADC_CHANNEL_7
void device_adc_init(uint8_t adc, uint8_t channel);
int device_adc_read(uint8_t channel);

#endif  // _DEVICE_ADC_H_